﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business.WEB;

namespace AirlinePilotAcedemy_WEB
{
    public partial class SearchMonthSubjects : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Login.aspx?");
            }
            GridView1.DataSource = ViewSubjectsManager.LoadSubjects();
            GridView1.DataBind();
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewRow row = GridView1.SelectedRow;
            Response.Redirect("ConfirmInscriptionSubject.aspx?codMateria="+ row.Cells[2].Text+"&sigla="+ row.Cells[3].Text+"&nombre="+ row.Cells[4].Text+"&creditos="+ row.Cells[5].Text+"&descripcion="+row.Cells[6].Text);
        }
    }
}